package oojo.data;

/**
 * Provides data access operations for entities.
 * 
 * @param <E> the entity type
 */
public interface Repository<E> {

    /**
     * Execute a query based on a specification strategy.
     * 
     * @param spec the query specification / configuration
     * @return the query result
     * @throws RepositoryException
     */
    <R> R execute(Query<E, R> spec);
}
